// src/api/api.ts
import request from "@/utils/request";

/**
 * 获取全部权限
 * @param data
 * @returns
 */
export const getAllPermissionApi = () => {
  return request({
    url: "/api/permission/list",
    method: "GET",
  });
};

/**
 * 获取全部菜单
 * @param data
 * @returns
 */
export const getAllMenuApi = () => {
  return request({
    url: "/api/menu/allMenu",
    method: "GET",
  });
};

/**
 * 获取菜单权限关系
 * @param data
 * @returns
 */
export const getMenuRoleApi = (id: number) => {
  return request({
    url: `/api/menu/getMenuRoleById/${id}`,
    method: "GET",
  });
};
